package com.company.pushTools;

import com.company.core.validator.group.AddGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

@Data
@ApiModel(value="PushParams",description="推送参数实体类")
public class PushParams implements Serializable {
    @ApiModelProperty(value="推送范围 1是个人，2是所有",name="range",example="1")
    @NotNull(message = "range不能为空",groups = {AddGroup.class})
    protected Integer range;

    @ApiModelProperty(value="当前机构的AccessToken",name="accessToken",example="1")
    protected String accessToken;

    @ApiModelProperty(value="推送的次数",name="count",example="1")
    protected Integer count;

    @ApiModelProperty(value="如果设置了这个参数，则只推送给他自己",name="touser",example="1")
    protected String touser;

    @ApiModelProperty(value="推送标题",name="first",example="1")
    @NotNull(message = "推送标题不能为空",groups = {AddGroup.class})
    private String first;
    @ApiModelProperty(value="推送标题颜色",name="firstColor",example="1")
    private String firstColor;

    @ApiModelProperty(value="推送备注",name="remark",example="1")
    @NotNull(message = "推送备注不能为空",groups = {AddGroup.class})
    private String remark;

    @ApiModelProperty(value="推送备注颜色",name="remarkColor",example="1")
    private String remarkColor;

    @ApiModelProperty(value="小程序appId",name="xcxAppid",example="1")
    private String xcxAppid;
    @ApiModelProperty(value="小程序跳转页面地址",name="xcxPath",example="1")
    private String xcxPath;

    @ApiModelProperty(value="参数字符串数组",name="keywords",dataType="List", example = "[1,2,3]")
    @NotNull(message = "参数字符串数组",groups = {AddGroup.class})
    private List<Map<String,String>> keywords;


    @ApiModelProperty(value="推送跳转url",name="url",example="1")
    @NotNull(message = "推送跳转url不能为空",groups = {AddGroup.class})
    private String url;

    @ApiModelProperty(value="推送模板id，可去微信后台模板消息查看",name="templateId",example="1")
    @NotNull(message = "推送模板id不能为空",groups = {AddGroup.class})
    private String templateId;

    @ApiModelProperty(value="用户数组",name="openIdList",dataType="List", example = "[1,2,3]")
    List<String> openIdList;
}